<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>桐州监狱指挥中心信息管理系统</title>
    <link href="/static/uimaker/css/base.css" rel="stylesheet">
    <link href="/static/uimaker/css/login/login.css" rel="stylesheet">
    <script type="text/javascript" src="/static/easyui/jquery.min.js"></script>
    <script>
        $(function () {

            if(top.location !== location){
                parent.location.reload();
            }

            $('body').bind('keyup', function(event) {
                if (event.keyCode == "13") {
                    event.preventDefault();
                    dologin()
                }
            });
        });
        function changeVeryfy() {
            $("#verifyImg").attr('src', '/passport/getVerify?time=' + Math.random());
        }
        function dologin() {
            $("#btn").attr('disabled', true);
            var username = $('#username').val();
            if (username.length == 0) {
                return;
            }
            var password = $('#password').val();
            if (password.length == 0) {
                return;
            }
            var verifyCode = $('#verifyCode').val();
            if (verifyCode.length == 0) {
                return;
            }
            $.ajax({
                url: "/passport/doLogin",
                type: "POST",
                dataType: "json",
                async: false,
                data: {
                    username: username,
                    password: password,
                    verifyCode: verifyCode
                },
                success: function (data) {
                    $("#btn").attr('disabled', false);
                    if (data.code == '200') {
                        $(location).attr('href', '/management/index');
                    } else {
                        $("#verifyImg").attr('src', '/passport/getVerify?time=' + Math.random());
                        $('#errorMsg').text(data.errDetail);
                        $('#errorMsg').show();
                    }
                },
                error: function () {
                    $("#btn").attr('disabled', false);
                }
            });
        }

    </script>
</head>
<body class="default">
<div class="login-hd">
    <div class="left-bg"></div>
    <div class="right-bg"></div>
    <div class="hd-inner">
        <span class="logo"></span>
        <span class="split"></span>
        <span class="sys-name">桐州监狱指挥中心信息管理系统</span>
    </div>
</div>
<div class="login-bd">
    <div class="bd-inner">
        <div class="inner-wrap">
            <div class="lg-zone">
                <div class="lg-box">
                    <div class="lg-label"><h4>用户登录</h4></div>
                    <div id="errorMsg" style="display: none" class="alert alert-error">
                        <i class="iconfont">&#xe62e;</i>
                        <span>请输入用户名</span>
                    </div>
                    <form>
                        <div class="lg-username input-item clearfix">
                            <i class="iconfont">&#xe60d;</i>
                            <input id="username" name="username" type="text" placeholder="账号/邮箱">
                        </div>
                        <div class="lg-password input-item clearfix">
                            <i class="iconfont">&#xe634;</i>
                            <input id="password" name="password" type="password" placeholder="请输入密码">
                        </div>
                        <div class="lg-check clearfix">
                            <div class="input-item">
                                <i class="iconfont">&#xe633;</i>
                                <input id="verifyCode" type="text" placeholder="验证码">
                            </div>
                            <a href="javascript:;" style="height: 31px" onclick="changeVeryfy()"><img
                                    id="verifyImg"
                                    style=" margin:0 0 0 3px ; vertical-align:middle; height:31px;"
                                    src="/passport/getVerify"></a></div>
                        <div class="tips clearfix">
                            <label><input type="checkbox" checked="checked">记住用户名</label>
                            <a href="javascript:;" class="register">如密码遗失请联系管理员</a>
                        <#--<a href="javascript:;" class="forget-pwd">忘记密码？</a>-->
                        </div>
                        <div class="enter">
                            <a id="btn" href="javascript:;" class="purchaser"
                               onClick="dologin()">登录</a>
                        <#--<a href="javascript:;" class="supplier" onClick="javascript:window.location='main.html'">供应商登录</a>-->
                        </div>
                    </form>
                </div>
            </div>
            <div class="lg-poster"></div>
        </div>
    </div>
</div>
<div class="login-ft">
    <div class="ft-inner">
        <div class="about-us">
            <a href="javascript:;">关于我们</a>
            <a href="javascript:;">法律声明</a>
            <a href="javascript:;">服务条款</a>
            <a href="javascript:;">联系方式</a>
        </div>
        <div class="address">地址：贵州省黔南州都匀市桐州路52号&nbsp;邮编：558000&nbsp;&nbsp;Copyright&nbsp;©&nbsp;2018&nbsp;-&nbsp;2022&nbsp;桐州监狱
            版权所有
        </div>
        <div class="other-info">建议使用IE8及以上版本浏览器&nbsp;黔ICP备&nbsp;000000号-3&nbsp;E-mail：draven1122@163.com</div>
    </div>
</div>
</body>
</html>

<script type="text/javascript">

</script>
